
module.exports = [
  {
    url: '/test/extraction',
    type: 'post',
    response: config => {
      const { number } = config.body
      if (number === '123') {
        return {
          code: 200,
          isExist: false,
          data: [
            '上海',
            '厦门',
            '福建'
          ]
        }
      } else {
        return {
          code: 200,
          isExist: true
        }
      }
    }
  },
  {
    url: '/test/updateTopic',
    type: 'post',
    response: config => {
      const { number } = config.body
      const { topic } = config.body
      if (number === '123' && topic === '上海') {
        return {
          code: 200,
          isOk: true
        }
      }
    }
  },
  {
    url: '/test/gettopic',
    type: 'get',
    response: config => {
      const { number } = config.query
      if (number === '123' || number === '1234') {
        return {
          code: 200,
          topic: '上海'
        }
      }
    }
  }
]
